package org.example;

public class Main
{

    public static void main(String[] args)
    {
        StudentManagement sm = new StudentManagement();
        //用户操作标志
        int option = -1;
        Loop: while(true){
            // 打印提示信息
            sm.prompt();
            //获取用户操作
            option = sm.in.nextInt();
            if(option < 0 || option > 4)
                continue;
            switch(option){//byte char short int
                case 1:
                    sm.addStudent();
                    break;
                case 2:
                    sm.deleteStudent();
                    break;
                case 3:
                    sm.updateStudent();
                    break;
                case 4:
                    sm.selectStudent();
                    break;
                case 0:
                    break Loop;
            }//end switch
        }// end while
        System.out.println("游戏结束, byebye");

        /*

        Duration d1 = new Duration(1,1,1);

        int totalSeconds =d1.getTotalSeconds();
        System.out.println("1小时1分钟1秒: " + totalSeconds);

        System.out.println("-------------------------");

        Duration d2 = new Duration(3660);

        int hour = d2.get_hour();
        System.out.println("hour = " + hour);

        System.out.println("-------------------------");

        d2.disp();

        Teacher t = new Teacher();
        t.show();

        System.out.println("------------------------");

        t.disp();

        Person p1 = new Person("jack", 21);
        p1.show();

        System.out.println("------------------------");

        Person p2 = new Person("lucy");
        p2.show();

        Car car = new Car();

        car.setColor("红色");
        car.setBrand("宝马");
        car.setPrice(50000.0);

        car.printCarInfo();

        car.moveBackward();
        car.moveForward();
        car.turn();

         */
    }
}